
import processing.core.PImage;

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 *
 * @author admindev
 */
public class BunkerEnemy
{
    public Jeu program;
    
    private int x = 1060;
    private int y = 150;
    private int height = 100;
    private int width = 100;
    
    private PImage image;
    private String nameImage = "base_ennemy.png";
    
    public BunkerEnemy(Jeu app)
    {
        program = app;
    }
    
    public void display()
    {
        program.image(getImage(),x ,y ,height ,width );
    }
    
    public PImage getImage()
    {
        
        if(image == null)
        {
            image = program.loadImage(nameImage);
        }
        
        return image;
    }
    
    public boolean onPosition(float mouseX ,float mouseY)
    {
        if( mouseX > x && mouseX < x+width && mouseY > y && mouseY < y+height )
            return true;
        else
            return false;
    }
    
    public int getY()
    {
        return y;
    }

    public void setY(int y)
    {
        this.y = y;
    }

    public int getX()
    {
        return x;
    }

    public void setX(int x)
    {
        this.x = x;
    }

    public int getHeight()
    {
        return height;
    }

    public void setHeight(int height)
    {
        this.height = height;
    }

    public int getWidth()
    {
        return width;
    }

    public void setWidth(int width)
    {
        this.width = width;
    }
    
    public String getNameImage()
    {
        return nameImage;
    }

}
